package com.dal.db;

import com.dal.db.cache.*;
import com.dal.db.dao.*;
import com.sojoys.artifact.build.data.base.BaseCache;
import com.xiaoleilu.hutool.date.DateUtil;
import com.xiaoleilu.hutool.date.TimeInterval;
import com.xiaoleilu.hutool.log.Log;
import com.xiaoleilu.hutool.log.LogFactory;
/**
 * 数据存储
 */
public class DbSave {
	
	static final Log log = LogFactory.get(DbSave.class);
	
	public static void init(){
		TimeInterval timer = DateUtil.timer();
		
		
		log.info("--> DbSave init autoId ({})",timer.intervalMs());
		log.info("--> DbSave init ({})",timer.intervalMs());
	}

	public static boolean saveAll() throws Exception{
		TimeInterval timer = DateUtil.timer();
		// 充值订单
		RechargeOrderCache.me().saveAll();
		log.info("--> DbSave saveAll ({})",timer.intervalMs());
		return true;
	}
	public static boolean shutdownAll() throws Exception{
		saveAll();
		BaseCache.shutdown();
		return true;
	}
//自定义内容起始位置
//自定义内容结束位置
}